package com.devplatform.pojo.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class ArticleDto {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;//文章ID
    private String username;//作者名
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId; //作者用户ID
    private String avatar; //头像
    private String title;//标题
    private String content;//内容
    private String summary;//摘要
    private LocalDateTime createTime;//创建时间
    private LocalDate publishTime;//发布时间
    private LocalDateTime updateTime;//修改时间
    private List<String> category;//板块


    private Integer likeCount;//点赞
    private Integer commentCount;//评论数（回复）
    private Integer collectCount;//收藏
    private Long articlePoints;//作者投入积分（积分）
    private Long fans;//粉丝数

    private int viewCount;// 浏览量
    private String articleStatusId;//文章的状态

    private List<ArticleAttachmentDto> attachments;
    private AuthorDto authorDto;//作者dto

    private Boolean isLiked; // 当前用户是否已点赞
    private Boolean isCollected;
}